import request from '@/utils/request'

// 查询方案主列表
export function listPlan(query) {
  return request({
    url: '/plan/luxuryPlan/list',
    method: 'get',
    params: query
  })
}

// 查询方案主详细
export function getPlan(planId) {
  return request({
    url: '/plan/luxuryPlan/' + planId,
    method: 'get'
  })
}

// 新增方案主
export function addPlan(data) {
  return request({
    url: '/plan/luxuryPlan',
    method: 'post',
    data: data
  })
}

// 修改方案主
export function updatePlan(data) {
  return request({
    url: '/plan/luxuryPlan',
    method: 'put',
    data: data
  })
}

// 删除方案主
export function delPlan(planId) {
  return request({
    url: '/plan/luxuryPlan/' + planId,
    method: 'delete'
  })
}

// 导出方案主
export function exportPlan(query) {
  return request({
    url: '/plan/luxuryPlan/export',
    method: 'get',
    params: query
  })
}

// 车型业务配置列表
export function configurationList(query) {
  return request({
    url: '/plan/luxuryPlan/configurationList',
    method: 'get',
    params: query
  })
}

// 节假日
export function holidayList(query) {
  return request({
    url: '/plan/luxuryPlan/holidayList',
    method: 'get',
    params: query
  })
}

// 收费项
export function chargeItemsList(query) {
  return request({
    url: '/plan/luxuryPlan/chargeItemsList',
    method: 'get',
    params: query
  })
}

// 套餐
export function mealList(query) {
  return request({
    url: '/plan/luxuryPlan/mealList',
    method: 'get',
    params: query
  })
}
// 启停用
export function stopUsingEnabled(data) {
  return request({
    url: '/plan/luxuryPlan/stopUsingEnabled',
    method: 'put',
    data: data
  })
}
